<template>
  <div class="header">
    <div class="logo">
      <i class="fas fa-heartbeat"></i>
    </div>
    <div class="title">
      <h1>不喝龙井</h1>
      <p>新的一天，呼吸清新的空气，拥抱明媚 ☀</p>
    </div>
    <div class="profile">
      <span class="badge">签到</span>
    </div>
  </div>
</template>

<script>
export default {
  name: 'AppHeader'
};
</script>

<style scoped>
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to right, #A5D6A7, #B2EBF2);
  padding: 30px 15px 25px;
  color: #FFF;
  border-radius: 0 0 25px 25px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.logo i {
  font-size: 28px;
  color: #FFF;
}

.title {
  flex: 0 1 auto; /* 自适应宽度 */
  margin-left: 5px; /* 减小与图标的间距 */
  margin-right: 15px; /* 增加与签到按钮的间距 */
  max-width: 55%; /* 进一步限制标题区域宽度 */
}

.title h1 {
  font-size: 22px;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.title p {
  font-size: 12px;
  margin: 6px 0 0;
  opacity: 0.9;
  white-space: nowrap;
}

.profile {
  flex-shrink: 0; /* 防止被压缩 */
  margin-left: 10px;
}

.profile .badge {
  background: #FF6F61;
  color: #FFF;
  padding: 6px 25px; /* 增加水平内边距 */
  min-width: 70px; /* 增加最小宽度 */
  text-align: center;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: inline-block;
  white-space: nowrap;
}
</style>